package com.xiu.travel.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;

/**
 * @author lijie
 * @date 2023/7/4 15:11
 * @description SFStatusEnum
 */
@AllArgsConstructor
public enum SFStatusEnum implements IEnum<Integer>
{
    /**
     * 订单创建
     */
    ORDER_CREATED(1, "订单创建",DaDaCallbackStatusEnum.WAIT_ACCEPT),
    /**
     * 订单取消
     */
    ORDER_CANCELLED(2, "订单取消",DaDaCallbackStatusEnum.CANCELED),
    /**
     * 配送员接单
     */
    COURIER_ACCEPTED(10, "配送员接单",DaDaCallbackStatusEnum.WAIT_PICKUP),
    /**
     * 配送员到店
     */
    COURIER_ARRIVED(12, "配送员到店",DaDaCallbackStatusEnum.COURIER_AT_STORE),
    /**
     * 配送员配送中（已取货
     */
    COURIER_DELIVERING(15, "配送员配送中（已取货）",DaDaCallbackStatusEnum.DELIVERING),
    /**
     * 配送员完成订单
     */
    COURIER_COMPLETED(17, "配送员完成订单",DaDaCallbackStatusEnum.COMPLETED);

    @EnumValue
    private final Integer code;
    @JsonValue
    private final String status;

    private final DaDaCallbackStatusEnum daCallbackStatusEnum;

    public String getStatus() {
        return status;
    }

    public DaDaCallbackStatusEnum getDiscountStatus() {return daCallbackStatusEnum;}

    @Override
    public Integer getValue() {
        return code;
    }
}
